package top.csjss.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import top.csjss.domain.EbookEntry;
import top.csjss.domain.EbookEntryExample;

public interface EbookEntryDao {
    long countByExample(EbookEntryExample example);

    int deleteByExample(EbookEntryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(EbookEntry record);

    int insertSelective(EbookEntry record);

    List<EbookEntry> selectByExample(EbookEntryExample example);

    EbookEntry selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") EbookEntry record, @Param("example") EbookEntryExample example);

    int updateByExample(@Param("record") EbookEntry record, @Param("example") EbookEntryExample example);

    int updateByPrimaryKeySelective(EbookEntry record);

    int updateByPrimaryKey(EbookEntry record);

    /**
     * 根据分类查询，分页
     * @param categoryId
     * @return
     */
    List<EbookEntry> findByCategoryId(Integer categoryId);
}
